package in.muton.edushare.pages.coursepages;

import in.muton.edushare.components.alertpanel.AlertPanel;
import in.muton.edushare.components.messaging.recievepanel.IncomingMessagesPanel;
import in.muton.edushare.components.messaging.sendpanel.ActionPanel;
import in.muton.edushare.wicket.models.CayenneModel;

import org.apache.wicket.PageParameters;

import com.edushare.common.constants.ApplicationConstants;

public class CoursePage extends CourseBase {
	public CoursePage(PageParameters params) {
		super(params);
		add(new ActionPanel("actionPanel", getCourseInstance().getObject(),
				this));
		add(new IncomingMessagesPanel("msgPanel", getCourseInstance()
				.getObject()));
		add(new AlertPanel("alertPanel", new CayenneModel<Object>(
				getCourseInstance().getObject())));
	}

	@Override
	public String getPageTitle() {
		return getLoggedInUser().getCompleteUserName() + " | "
				+ getCourse().getObject().getCourseName() + " | "
				+ ApplicationConstants.APPLICATION_NAME;
	}

	@Override
	protected String getActivePage(PageParameters params) {
		return "courseNews";
	}
}
